package com.heima.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

@FeignClient("account-service")
public interface AccountClient {
    /**
     * 扣减账户金额
     * @param userId
     * @param money
     * @return
     */
    @PutMapping("/account/{userId}/{money}")
    public ResponseEntity deduct(@PathVariable("userId") Integer userId, @PathVariable("money") Integer money);
}
